<template>
  <div class="apply">
    <Navigation :logoName="logoName" :routeInfo="routeInfo"></Navigation>
    <div class="formContent">
      <div class="show">
        <div class="stepLogo"></div>
        <div class="formClass">
          <h2>第三人信息</h2>
          <div class="showContent">
             <div class="infocontents" v-for="(ivs,index) in infoValue" :key="index" v-if="ivs.type==9">
                <div class="left">
                    <Form :label-width="130">
                        <FormItem label="第三人类型">
                            <Input value="公司" disabled/>
                        </FormItem>
                        <FormItem label="公司全称">
                            <Input v-model="ivs&&ivs.companyName" disabled/>
                        </FormItem>
                        <FormItem label="法定代表人">
                            <Input v-model="ivs&&ivs.legalName" disabled/>
                        </FormItem>
                        <FormItem label="职务">
                            <Input v-model="ivs&&ivs.legalPosition" disabled/>
                        </FormItem>
                        <FormItem label="住所地">
                            <Input v-model="ivs&&ivs.companyAddress" disabled/>
                        </FormItem>
                        <FormItem label="机构代码">
                            <Input v-model="ivs&&ivs.orgCode" disabled/>
                        </FormItem>
                        <FormItem label="联系人">
                            <Input v-model="ivs&&ivs.contactName" disabled/>
                        </FormItem>
                        <FormItem label="联系电话">
                            <Input v-model="ivs&&ivs.contactNumber" disabled/>
                        </FormItem>
                        <FormItem label="邮箱">
                            <Input v-model="ivs&&ivs.companyEmail" disabled/>
                        </FormItem>
                    </Form>
                </div>
                <div class="right">
                    <Form :label-width="130">
                        <FormItem label="律师事务所全称">
                            <Input v-model="ivs&&ivs.proxyName" disabled/>
                        </FormItem>
                        <FormItem label="住所地">
                            <Input v-model="ivs&&ivs.proxyAddress" disabled/>
                        </FormItem>
                        <FormItem label="邮箱">
                            <Input v-model="ivs&&ivs.proxyEmail" disabled/>
                        </FormItem>
                        <FormItem label="电话">
                            <Input v-model="ivs&&ivs.proxyNumber" disabled/>
                        </FormItem>
                        <FormItem label="承办律师姓名">
                            <Input v-model="ivs&&ivs.lawyerName" disabled/>
                        </FormItem>
                    </Form>
                </div>
              </div>
              <div class="singleInfo" v-else-if="ivs.type==7||ivs.type==8">
                  <Form :model="ivs" :label-width="130">
                      <FormItem label="第三人类型">
                          <Input value="个人" disabled/>
                      </FormItem>
                      <FormItem label="姓名">
                          <Input v-model="ivs&&ivs.name" disabled/>
                      </FormItem>
                      <FormItem label="身份证号">
                          <Input v-model="ivs&&ivs.idCard" disabled/>
                      </FormItem>
                      <FormItem label="联系方式">
                          <Input v-model="ivs&&ivs.contact" disabled/>
                      </FormItem>
                      <FormItem label="邮箱">
                          <Input v-model="ivs&&ivs.email" disabled/>
                      </FormItem>
                      <FormItem label="地址">
                          <Input v-model="ivs&&ivs.address" disabled/>
                      </FormItem>
                  </Form>
              </div>
          </div>
          
          <div class="btn-form">
            <Form :label-width="10">
                <FormItem>
                    <Button @click="handleReset()" style="margin-left: 8px">上一步</Button>
                    <Button type="primary" @click="handleSubmit()">下一步</Button>
                </FormItem>
            </Form>
          </div>
          
        </div>
      </div>
      
    </div>
    
  </div>
</template>

<script>
import Navigation from '../common/navigation'
export default {
  name: 'ApplySecondForm',
  data(){
     return {
       logoName:'提交仲裁申请',
       routeInfo:'首页/仲裁申请/提交仲裁申请',
       formValidate:{},
       infoValue:[]
     }
  },
  props: {
    msg: String
  },
  methods:{
    handleSubmit () {
      this.$router.push({name:'ApplyFourForm',params:{caseInfos:this.$route.params.caseInfos}});
    },
    handleReset () {
         this.$router.push({name:'ApplySecondForm',params:{caseInfos:this.$route.params.caseInfos}});
    }
  },
  components:{Navigation},
  mounted(){
    this.$http.post('/api2'+this.urls.queryPlatformInfo,{caseNo:this.$route.params.caseInfos,submitStatus:4,pagenum:1,pagesize:8}).then((result)=>{
       
          if(result.data.code==200&&result.data.data.data.list.length>0){
            this.infoValue=result.data.data.data.list[0].dsfList;
          }else{
            this.$Message.warning('请求失败');
            this.$router.push('/SysApplypage/Apply');
          }
    }) 
  }
  // mounted(){
  //   this.formValidate=JSON.parse(this.$route.params.caseInfos);
  //   this.infoValue=this.formValidate.dsfList&&this.formValidate.dsfList.length>0?this.formValidate.dsfList:[];
  // }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .fonttitle{
    font-size: 16px;
  }
  h2{
    color: #000;
    height: 70px;
    line-height: 70px;
  }
  .ivu-btn-default{
    margin-right: 160px;
  }
  .ivu-btn-primary {
      color: #fff;
      background-color: #2e37cb;
  }
  .ivu-form-item{
    margin-bottom: 10px;
  }
  .table{
    background: #fff;
    margin-top: 20px;
    height: 590px;
    padding: 0 20px;
  }

  .btn-form{
    margin-top: 20px;
  }
  .formClass{
    /* width: 484px;
    margin: 0 auto; */
  }
  .infocontents{
    display: grid;
    grid-template-columns: 50% 50%;
    margin-bottom: 30px;
    border-bottom: 1px solid #e6e6e6;
  }
  .showContent{
    height: 480px;
    overflow-y: auto;
    padding-right: 18px;
  }
  .show{
    width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-top: 30px;
  }
  .btn{
    background: #2e37cb;
    color: #fff;
    line-height: 30px;
    width: 120px;
    height: 30px;
    display: inline-block;
    margin-left: 50px;
    text-align: center;
    cursor: pointer;
  }
  .btn-apply{
    background: #1aa864;
  }
  .filterCon{
    margin: 20px;
  }
  .applyTime{
    margin: 0 40px;
  }
  .stepLogo{
    background:url('../../assets/third.png') no-repeat;
    height:80px;
  }
  .singleInfo{
    padding: 0px 126px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e6e6e6;
  }
</style>
